import 'element-ui/lib/theme-chalk/index.css'

import {
  Tooltip,
  Loading,
  Upload,
  Image,
  Input,
  Form,
  FormItem,
  Button,
  Message,
  Card,
  Popover,
  Popconfirm,
  Table,
  TableColumn,
  Dialog,
  Select,
  Option,
  Pagination
} from 'element-ui'

const cpms = {
  Tooltip,
  Loading,
  Upload,
  Image,
  Input,
  Form,
  FormItem,
  Button,
  Card,
  Popover,
  Popconfirm,
  Table,
  TableColumn,
  Dialog,
  Select,
  Option,
  Pagination
}

export default {
  install(Vue) {
    Vue.prototype.$message = Message
    Object.keys(cpms).forEach(k => Vue.use(cpms[k]))
  }
}
